<title>设备</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="home/info">主页</a>
        <a><cite>卡券管理</cite></a>
        <a><cite>卡券列表</cite></a>
    </div>
</div>

<style>
    td .layui-table-cell{
        height: auto;
        overflow:visible;
        text-overflow:inherit;
        white-space:normal;
        word-break: break-all;
    }
</style>

<div class="layui-fluid" id="LAY-demo-carousel">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">卡券列表</div>
                <div class="layui-card-body">
                    <table id="LAY-coupon-list" lay-filter="LAY-coupon-list"></table>
                    <script type="text/html" id="table-tool">
                        <div class="layui-form" lay-filter="app-header-search">
                            <a class="layui-btn" lay-event="add">添加卡券</a>
                            <div class="layui-inline">
                                <label class="layui-form-label">类型</label>
                                <div class="layui-input-inline">
                                    <select name="search[type]" lay-verify="required" class="layui-input-sm">
                                        <option value="">请选择类型</option>
                                        <option value="name">名称</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input type="text" name="search[content]" placeholder="请输入" autocomplete="off" lay-verify="required" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button class="layui-btn layuiadmin-btn-list" lay-submit lay-filter="table-coupon-list-search">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                            </div>
                        </div>
                    </script>

                    <script type="text/html" id="table-status">
                        {{# if(d.is_online == 1){ }}
                        <a class="layui-btn layui-btn-normal layui-btn-xs">在线</a>
                        {{# }else{ }}
                        <a class="layui-btn layui-btn-danger layui-btn-xs">离线</a>
                        {{# } }}
                    </script>
                    <script type="text/html" id="table-type">
                        {{# if(d.type == 1){ }}
                        <a class="layui-btn layui-btn-normal layui-btn-xs">注册发放</a>
                        {{# }else{ }}
                        <a class="layui-btn layui-btn-danger layui-btn-xs">主动发放</a>
                        {{# } }}
                    </script>
                    <script type="text/html" id="table-progress">
                        <div class="layui-progress layuiadmin-order-progress" lay-showpercent="true">
                            <div class="layui-progress-bar layui-bg-blue" lay-percent= {{ d.stock }}></div>
                        </div>
                    </script>
                    <script type="text/html" id="table-switch">
                        <input type="checkbox" name="sex" lay-skin="switch" lay-text="管理|普通" lay-filter="table-user-list-status"
                               value="{{ d.is_admin }}" data-json="{{ encodeURIComponent(JSON.stringify(d)) }}" {{ !d.is_admin || 'checked' }}>
                    </script>
                    <script type="text/html" id="app-table-oper">
                        <div class="layui-tab">
                            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
                        </div>
                    </script>
                </div>
            </div>
        </div>

    </div>
</div>

<script>
    layui.use('coupon',layui.factory('coupon')).use(['coupon'], function(){
        let $ = layui.$


    });
</script>
